#!/bin/sh
exec 2>&1
<%= render("mount_point_check.erb") %>
umask 077
exec chpst -P \
  -U <%= node['gitlab']['user']['username'] %>:<%= node['gitlab']['user']['group'] %> \
  -u <%= node['gitlab']['user']['username'] %>:<%= node['gitlab']['user']['group'] %> \
  /opt/gitlab/embedded/bin/gitlab-exporter web \
    -c <%= node['monitoring']['gitlab-exporter']['home'] %>/gitlab-exporter.yml
